3.222 \(\int \frac{a+b \log (c (d+e x)^n)}{(f+g x) (h+i x)^2} \, dx\)

Optimal. Leaf size=252 \[ \frac{b g n \text{PolyLog}\left (2,-\frac{g (d+e x)}{e f-d g}\right )}{(g h-f i)^2}-\frac{b g n \text{PolyLog}\left (2,-\frac{i (d+e x)}{e h-d i}\right )}{(g h-f i)^2}+\frac{a+b \log \left (c (d+e x)^n\right )}{(h+i x) (g h-f i)}+\frac{g \log \left (\frac{e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(g h-f i)^2}-\frac{g \log \left (\frac{e (h+i x)}{e h-d i}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(g h-f i)^2}-\frac{b e n \log (d+e x)}{(e h-d i) (g h-f i)}+\frac{b e n \log (h+i x)}{(e h-d i) (g h-f i)} \]

[Out]

-((b*e*n*Log[d + e*x])/((e*h - d*i)*(g*h - f*i))) + (a + b*Log[c*(d + e*x)^n])/((g*h - f*i)*(h + i*x)) + (g*(a
 + b*Log[c*(d + e*x)^n])*Log[(e*(f + g*x))/(e*f - d*g)])/(g*h - f*i)^2 + (b*e*n*Log[h + i*x])/((e*h - d*i)*(g*
h - f*i)) - (g*(a + b*Log[c*(d + e*x)^n])*Log[(e*(h + i*x))/(e*h - d*i)])/(g*h - f*i)^2 + (b*g*n*PolyLog[2, -(
(g*(d + e*x))/(e*f - d*g))])/(g*h - f*i)^2 - (b*g*n*PolyLog[2, -((i*(d + e*x))/(e*h - d*i))])/(g*h - f*i)^2

________________________________________________________________________________________

Rubi [A]  time = 0.258695, antiderivative size = 252, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 7, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.241, Rules used = {2418, 2394, 2393, 2391, 2395, 36, 31} \[ \frac{b g n \text{PolyLog}\left (2,-\frac{g (d+e x)}{e f-d g}\right )}{(g h-f i)^2}-\frac{b g n \text{PolyLog}\left (2,-\frac{i (d+e x)}{e h-d i}\right )}{(g h-f i)^2}+\frac{a+b \log \left (c (d+e x)^n\right )}{(h+i x) (g h-f i)}+\frac{g \log \left (\frac{e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(g h-f i)^2}-\frac{g \log \left (\frac{e (h+i x)}{e h-d i}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(g h-f i)^2}-\frac{b e n \log (d+e x)}{(e h-d i) (g h-f i)}+\frac{b e n \log (h+i x)}{(e h-d i) (g h-f i)} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*(d + e*x)^n])/((f + g*x)*(h + i*x)^2),x]

[Out]

-((b*e*n*Log[d + e*x])/((e*h - d*i)*(g*h - f*i))) + (a + b*Log[c*(d + e*x)^n])/((g*h - f*i)*(h + i*x)) + (g*(a
 + b*Log[c*(d + e*x)^n])*Log[(e*(f + g*x))/(e*f - d*g)])/(g*h - f*i)^2 + (b*e*n*Log[h + i*x])/((e*h - d*i)*(g*
h - f*i)) - (g*(a + b*Log[c*(d + e*x)^n])*Log[(e*(h + i*x))/(e*h - d*i)])/(g*h - f*i)^2 + (b*g*n*PolyLog[2, -(
(g*(d + e*x))/(e*f - d*g))])/(g*h - f*i)^2 - (b*g*n*PolyLog[2, -((i*(d + e*x))/(e*h - d*i))])/(g*h - f*i)^2

Rule 2418

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rule 2394

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*(f +
g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n]))/g, x] - Dist[(b*e*n)/g, Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2393

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + (c*e*x)/g])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \frac{a+b \log \left (c (d+e x)^n\right )}{(h+222 x)^2 (f+g x)} \, dx &=\int \left (\frac{222 \left (a+b \log \left (c (d+e x)^n\right )\right )}{(222 f-g h) (h+222 x)^2}-\frac{222 g \left (a+b \log \left (c (d+e x)^n\right )\right )}{(222 f-g h)^2 (h+222 x)}+\frac{g^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{(222 f-g h)^2 (f+g x)}\right ) \, dx\\ &=-\frac{(222 g) \int \frac{a+b \log \left (c (d+e x)^n\right )}{h+222 x} \, dx}{(222 f-g h)^2}+\frac{g^2 \int \frac{a+b \log \left (c (d+e x)^n\right )}{f+g x} \, dx}{(222 f-g h)^2}+\frac{222 \int \frac{a+b \log \left (c (d+e x)^n\right )}{(h+222 x)^2} \, dx}{222 f-g h}\\ &=-\frac{a+b \log \left (c (d+e x)^n\right )}{(222 f-g h) (h+222 x)}-\frac{g \log \left (-\frac{e (h+222 x)}{222 d-e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(222 f-g h)^2}+\frac{g \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac{e (f+g x)}{e f-d g}\right )}{(222 f-g h)^2}+\frac{(b e g n) \int \frac{\log \left (\frac{e (h+222 x)}{-222 d+e h}\right )}{d+e x} \, dx}{(222 f-g h)^2}-\frac{(b e g n) \int \frac{\log \left (\frac{e (f+g x)}{e f-d g}\right )}{d+e x} \, dx}{(222 f-g h)^2}+\frac{(b e n) \int \frac{1}{(h+222 x) (d+e x)} \, dx}{222 f-g h}\\ &=-\frac{a+b \log \left (c (d+e x)^n\right )}{(222 f-g h) (h+222 x)}-\frac{g \log \left (-\frac{e (h+222 x)}{222 d-e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(222 f-g h)^2}+\frac{g \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac{e (f+g x)}{e f-d g}\right )}{(222 f-g h)^2}-\frac{(b g n) \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{g x}{e f-d g}\right )}{x} \, dx,x,d+e x\right )}{(222 f-g h)^2}+\frac{(b g n) \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{222 x}{-222 d+e h}\right )}{x} \, dx,x,d+e x\right )}{(222 f-g h)^2}+\frac{(222 b e n) \int \frac{1}{h+222 x} \, dx}{(222 d-e h) (222 f-g h)}-\frac{\left (b e^2 n\right ) \int \frac{1}{d+e x} \, dx}{(222 d-e h) (222 f-g h)}\\ &=\frac{b e n \log (h+222 x)}{(222 d-e h) (222 f-g h)}-\frac{b e n \log (d+e x)}{(222 d-e h) (222 f-g h)}-\frac{a+b \log \left (c (d+e x)^n\right )}{(222 f-g h) (h+222 x)}-\frac{g \log \left (-\frac{e (h+222 x)}{222 d-e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(222 f-g h)^2}+\frac{g \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac{e (f+g x)}{e f-d g}\right )}{(222 f-g h)^2}+\frac{b g n \text{Li}_2\left (-\frac{g (d+e x)}{e f-d g}\right )}{(222 f-g h)^2}-\frac{b g n \text{Li}_2\left (\frac{222 (d+e x)}{222 d-e h}\right )}{(222 f-g h)^2}\\ \end{align*}

Mathematica [A]  time = 0.249641, size = 196, normalized size = 0.78 \[ \frac{b g n \text{PolyLog}\left (2,\frac{g (d+e x)}{d g-e f}\right )-b g n \text{PolyLog}\left (2,\frac{i (d+e x)}{d i-e h}\right )+\frac{(g h-f i) \left (a+b \log \left (c (d+e x)^n\right )\right )}{h+i x}+g \log \left (\frac{e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )-g \log \left (\frac{e (h+i x)}{e h-d i}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )-\frac{b e n (g h-f i) (\log (d+e x)-\log (h+i x))}{e h-d i}}{(g h-f i)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*(d + e*x)^n])/((f + g*x)*(h + i*x)^2),x]

[Out]

(((g*h - f*i)*(a + b*Log[c*(d + e*x)^n]))/(h + i*x) + g*(a + b*Log[c*(d + e*x)^n])*Log[(e*(f + g*x))/(e*f - d*
g)] - (b*e*(g*h - f*i)*n*(Log[d + e*x] - Log[h + i*x]))/(e*h - d*i) - g*(a + b*Log[c*(d + e*x)^n])*Log[(e*(h +
 i*x))/(e*h - d*i)] + b*g*n*PolyLog[2, (g*(d + e*x))/(-(e*f) + d*g)] - b*g*n*PolyLog[2, (i*(d + e*x))/(-(e*h)
+ d*i)])/(g*h - f*i)^2

________________________________________________________________________________________

Maple [C]  time = 0.735, size = 970, normalized size = 3.9 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*(e*x+d)^n))/(g*x+f)/(i*x+h)^2,x)

[Out]

-1/2*I*b*Pi*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2/(f*i-g*h)/(i*x+h)+1/2*I*b*Pi*csgn(I*c*(e*x+d)^n)^3*g/(f*i-
g*h)^2*ln(i*x+h)-b*n*g/(f*i-g*h)^2*ln(g*x+f)*ln(((g*x+f)*e+d*g-f*e)/(d*g-e*f))-b*e*n/(f*i-g*h)/(d*i-e*h)*ln(e*
x+d)+b*e*n/(f*i-g*h)/(d*i-e*h)*ln(i*x+h)+b*n*g/(f*i-g*h)^2*ln(i*x+h)*ln(((i*x+h)*e+d*i-e*h)/(d*i-e*h))-a*g/(f*
i-g*h)^2*ln(i*x+h)+a*g/(f*i-g*h)^2*ln(g*x+f)-b*ln(c)/(f*i-g*h)/(i*x+h)+b*ln((e*x+d)^n)*g/(f*i-g*h)^2*ln(g*x+f)
-b*ln((e*x+d)^n)*g/(f*i-g*h)^2*ln(i*x+h)-b*n*g/(f*i-g*h)^2*dilog(((g*x+f)*e+d*g-f*e)/(d*g-e*f))+b*n*g/(f*i-g*h
)^2*dilog(((i*x+h)*e+d*i-e*h)/(d*i-e*h))-b*ln(c)*g/(f*i-g*h)^2*ln(i*x+h)+b*ln(c)*g/(f*i-g*h)^2*ln(g*x+f)-b*ln(
(e*x+d)^n)/(f*i-g*h)/(i*x+h)+1/2*I*b*Pi*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)*g/(f*i-g*h)^2*ln(i*x+h
)+1/2*I*b*Pi*csgn(I*c*(e*x+d)^n)^3/(f*i-g*h)/(i*x+h)-1/2*I*b*Pi*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2*g/(f*i
-g*h)^2*ln(i*x+h)+1/2*I*b*Pi*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2*g/(f*i-g*h)^2*ln(g*x+f)+1/2*I*b*Pi*csgn(I*(e*x+d)
^n)*csgn(I*c*(e*x+d)^n)^2*g/(f*i-g*h)^2*ln(g*x+f)-1/2*I*b*Pi*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)*g
/(f*i-g*h)^2*ln(g*x+f)-1/2*I*b*Pi*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2*g/(f*i-g*h)^2*ln(i*x+h)+1/2*I*b*Pi*csgn(I*c)
*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)/(f*i-g*h)/(i*x+h)-a/(f*i-g*h)/(i*x+h)-1/2*I*b*Pi*csgn(I*c)*csgn(I*c*(e*
x+d)^n)^2/(f*i-g*h)/(i*x+h)-1/2*I*b*Pi*csgn(I*c*(e*x+d)^n)^3*g/(f*i-g*h)^2*ln(g*x+f)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a{\left (\frac{g \log \left (g x + f\right )}{g^{2} h^{2} - 2 \, f g h i + f^{2} i^{2}} - \frac{g \log \left (i x + h\right )}{g^{2} h^{2} - 2 \, f g h i + f^{2} i^{2}} + \frac{1}{g h^{2} - f h i +{\left (g h i - f i^{2}\right )} x}\right )} + b \int \frac{\log \left ({\left (e x + d\right )}^{n}\right ) + \log \left (c\right )}{g i^{2} x^{3} + f h^{2} +{\left (2 \, g h i + f i^{2}\right )} x^{2} +{\left (g h^{2} + 2 \, f h i\right )} x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(g*x+f)/(i*x+h)^2,x, algorithm="maxima")

[Out]

a*(g*log(g*x + f)/(g^2*h^2 - 2*f*g*h*i + f^2*i^2) - g*log(i*x + h)/(g^2*h^2 - 2*f*g*h*i + f^2*i^2) + 1/(g*h^2
- f*h*i + (g*h*i - f*i^2)*x)) + b*integrate((log((e*x + d)^n) + log(c))/(g*i^2*x^3 + f*h^2 + (2*g*h*i + f*i^2)
*x^2 + (g*h^2 + 2*f*h*i)*x), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b \log \left ({\left (e x + d\right )}^{n} c\right ) + a}{g i^{2} x^{3} + f h^{2} +{\left (2 \, g h i + f i^{2}\right )} x^{2} +{\left (g h^{2} + 2 \, f h i\right )} x}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(g*x+f)/(i*x+h)^2,x, algorithm="fricas")

[Out]

integral((b*log((e*x + d)^n*c) + a)/(g*i^2*x^3 + f*h^2 + (2*g*h*i + f*i^2)*x^2 + (g*h^2 + 2*f*h*i)*x), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(e*x+d)**n))/(g*x+f)/(i*x+h)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{b \log \left ({\left (e x + d\right )}^{n} c\right ) + a}{{\left (g x + f\right )}{\left (i x + h\right )}^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))/(g*x+f)/(i*x+h)^2,x, algorithm="giac")

[Out]

integrate((b*log((e*x + d)^n*c) + a)/((g*x + f)*(i*x + h)^2), x)